<?php
require("config/config.php");
$mysql = new SaeMysql();
 
$uid= strip_tags( $_REQUEST['uid'] );
$bid = strip_tags( $_REQUEST['bid'] );

if(is_numeric($uid) && is_numeric($bid))
{
	$sql = "SELECT * FROM `bottle` WHERE bid=".$bid;
	$result = $mysql->getData( $sql );
	$num = count($result);
	
	if($num == 1){
		$rs=$result[0];
		$golden= $rs[golden];
          
		if($golden){
			//delete golden by self
			if(true){
				echo "false";
			}else{
				echo "false";
			}
		}else{
		    $sql = "UPDATE `bottle` SET deleteuid=".$uid." WHERE bid=".$bid;
		    $mysql->runSql( $sql );
	    	if( $mysql->errno() != 0 )
			{
				echo "false";
			}else{
				echo "true";
			}
	  }
	  
	}else{
		echo "false";
	}

}else{
	 echo "false";
}

$mysql->closeDb();
?>
